import http from '@/utils/request.js';

// 获取小组人员列表
export const getMembers = (data) => {
	// return http.get('/repair/maintain/plan/content/users/of/gourId',data);
	return http.request({
		url: '/repair/maintain/plan/content/users/of/gourId',
		method: 'get',
		data,
	});
};
// 批量添加保养计划
export const addPlans = (data) => {
	// return http.post('/repair/maintain/plan/content/save/batch', data, true);
	return http.request({
		url: '/repair/maintain/plan/content/save/batch',
		method: 'post',
		data,
		textJson: true,
	});
};
// 修改维保计划（修改时间
export const updatePlan = (data) => {
	// return http.post('/repair/maintain/plan/content/update/planDate', data, true);
	return http.request({
		url: '/repair/maintain/plan/content/update/planDate',
		method: 'post',
		data,
		textJson: true,
	});
};
// 删除维保计划
export const delPlan = (data) => {
	// return http.post('/repair/maintain/plan/content/delete', data, true);
	return http.request({
		url: '/repair/maintain/plan/content/delete',
		method: 'post',
		data,
		textJson: true,
	});
};

// 获取计划列表
export const getPlans = (data) => {
	// return http.post('/repair/maintain/plan/content/list', data, true);
	return http.request({
		url: '/repair/maintain/plan/content/list',
		method: 'post',
		data,
		textJson: true,
	});
};

// 合并组
export const mergeGroup = (data) => {
	// return http.post('/repair/maintain/plan/content/merge/group/user', data, true);
	return http.request({
		url: '/repair/maintain/plan/content/merge/group/user',
		method: 'post',
		data,
		textJson: true,
	});
};

// 拆分组
export const separateGroup = (data) => {
	// return http.post('/repair/maintain/plan/content/separate/group/user', data, true);
	return http.request({
		url: '/repair/maintain/plan/content/separate/group/user',
		method: 'post',
		data,
		textJson: true,
	});
};

// 获取小组关联的小区与电梯
export const getElevatorList = (data) => {
	// return http.get('/repair/maintain/plan/content/distribution/elevator/select', data);
	return http.request({
		url: '/repair/maintain/plan/content/distribution/elevator/select',
		method: 'get',
		data,
	});
};
// 获取小组关联的小区与电梯
export const getElevatorListchild = (data) => {
	// return http.get('/repair/maintain/plan/content/distribution/elevator/select/child', data);
	return http.request({
		url: '/repair/maintain/plan/content/distribution/elevator/select/child',
		method: 'get',
		data,
	});
};

// 获取电梯计划详情
export const getPlanDetail = (data) => {
	// return http.get('/repair/maintain/plan/content/getMaintainPlanDetail', data);
	return http.request({
		url: '/repair/maintain/plan/content/getMaintainPlanDetail',
		method: 'get',
		data,
	});
};

// 获取一键排期统计人数
export const planSchedulingStatistics = (data) => {
	// return http.get('/repair/maintain/plan/content/planSchedulingStatistics', data);
	return http.request({
		url: '/repair/maintain/plan/content/planSchedulingStatistics',
		method: 'get',
		data,
	});
};